//
// Created by 吴锐 on 2022/2/28.
//

#include "iostream"

using namespace std;

template<class T1, class T2>
class Person {
public:
    T1 m_Name;
    T2 m_Age;

//    Person(T1 name, T2 age){
//        this->m_Name = name;
//        this->m_Age = age;
//    }

//    void showPerson(){
//        cout << "name: " << this->m_Name << " age: " << this->m_Age << endl;
//    }

    Person(T1 name, T2 age);

    void showPerson();
};

template<class T1, class T2>
Person<T1, T2>::Person(T1 name, T2 age){
    this->m_Name = name;
    this->m_Age = age;
}

template<class T1, class T2>
void Person<T1, T2>::showPerson() {
    cout << "name: " << this->m_Name << " age: " << this->m_Age << endl;
}

void test01(){
    Person<string, int> p("tom", 20);
    p.showPerson();
}

int main(){
    test01();
    return 0;
}